<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" template="/template/template.xhtml"
	xmlns:s="http://sduept.security.el/func">
	<ui:define name="head">
		<title>一次设备更新消息管理</title>
		<link rel="stylesheet" href="/resources/bootstrap/css/bootstrap-datetimepicker.min.css" />
		<style>
.unCheck {
	background-color: #ADD8E6;
}

.checked {
	background-color: #F4A460;
}

.ui-datatable-scrollable-header-box {
	margin-left: 0px;
	margin-right: 15px !important;
}
</style>
	</ui:define>
	<ui:define name="content">
		<p:confirmDialog global="true" showEffect="fade" hideEffect="fade">
			<p:commandButton value="是" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
			<p:commandButton value="否" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
		</p:confirmDialog>
		<div id="headDiv" class="box box-solid with-border">
			<h:form id="btnForm">
				<p:growl id="msg" showDetail="true" />
				<div class="box-header" id="queryDiv">
					<p:outputLabel value="更新时间:" for="updateTimeStart" style="margin-right:5px;margin-left:10px;" />
					<p:calendar id="updateTimeStart" pattern="yyyy-MM-dd" navigator="true" autocomplete="off"
						maxdate="new Date()" value="#{cimEquipmentUpdateMessageController.updateTimeStart}" />
					<p:outputLabel for="updateTimeEnd" value="至" style="margin-right:5px;margin-left:5px;" />
					<p:calendar id="updateTimeEnd" pattern="yyyy-MM-dd" navigator="true" autocomplete="off"
						maxdate="new Date()" value="#{cimEquipmentUpdateMessageController.updateTimeEnd}" />
					<p:outputLabel value="名称:" for="title" style="margin-right:5px;margin-left:10px;" />
					<p:inputText id="title" value="#{cimEquipmentUpdateMessageController.name}"></p:inputText>
					<p:commandButton id="searchBtn" value="查询" update="form" icon="ui-icon-search"
						style="margin-left:30px" oncomplete="getTableScrollHeight();"
						actionListener="#{cimEquipmentUpdateMessageController.searchByCondition}" />
					<p:commandButton id="clearBtn" value="重置" update="btnForm form " icon="ui-icon-refresh"
						actionListener="#{cimEquipmentUpdateMessageController.clearCondition}"
						oncomplete="getTableScrollHeight();" />
				</div>
			</h:form>
		</div>
		<div id="infoDiv" class="box box-solid with-border">
			<h:form id="form">
				<div class="box-body">
					<p:dataTable id="dataTb" widgetVar="dataTb" var="message" rowKey="#{message.id}"
						emptyMessage="无记录" style="margin-bottom:20px" rows="15" paginator="true"
						rowStyleClass="#{message.status == 0  ?'unCheck':'checked'}"
						paginatorTemplate="{Customization} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
						rowsPerPageTemplate="15,20,50" paginatorPosition="bottom"
						value="#{cimEquipmentUpdateMessageController.messageList}" rowIndexVar="ite" scrollable="true">
						<f:facet name="{Customization}">
							<p:outputLabel value="总计：#{cimEquipmentUpdateMessageController.messageList.size()} 条记录"
								style="margin-right:20px;" />
						</f:facet>
						<p:column selectionMode="single" width="40" style="text-align:center" />
						<p:column width="60" headerText="序号" style="text-align:center">
							<h:outputText value="#{ite+1}" />
						</p:column>
						<p:column headerText="名称" style="text-align:center">
							<h:outputText value="#{message.name}" />
						</p:column>
						<p:column headerText="内容" style="text-align:center">
							<h:outputText value="#{message.content}" />
						</p:column>
						<p:column headerText="更新时间" style="text-align:center">
							<h:outputText value="#{message.updateTime}">
								<f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss"></f:convertDateTime>
							</h:outputText>
						</p:column>
						<p:column headerText="状态" style="text-align:center">
							<h:outputText value="#{message.status==0?'未确认':'已确认'}" />
						</p:column>
					</p:dataTable>
				</div>
			</h:form>
		</div>
	</ui:define>
	<ui:define name="contentend">
		<script src="#{request.contextPath}/resources/js/mymodal.js"></script>
		<script src="#{request.contextPath}/resources/bootstrap/js/bootstrap-datetimepicker.min.js"></script>
		<script src="/resources/js/tables/singleScrollTable.js" />
	</ui:define>
</ui:composition>
